QuickOPC User's Guide and Reference
Installing NuGet Packages in Visual Studio
Fundamentals > Referencing the NuGet Packages (.NET) > Installing NuGet Packages in Visual Studio
In This Topic

Note that before installing the NuGet packages, you need to create a Visual Studio project of the desired type. The NuGet packages get installed "into" the project.

Using Package Manager GUI

This text assumes that you are using Visual Studio 2022. With other tools, the procedures may be different, but should be reasonably similar.

In order to install a QuickOPC NuGet package and reference it from your project using the Package Manager GUI:

  1. In the Visual Studio Solution Explorer window, right-click the project, and select Manage NuGet Packages.
  2. Make sure that Package source is set to “nuget.org”.
  3. Type QuickOPC into the Search box. A list of available QuickOPC packages appears.
  4. Click on the package you are interested in. Its details appear in the pane next (right) to it.
  5. If needed, select a specific version of the package.
  6. Press the Install button. A Preview windows appears, summarizing the changes that are about to be made.
  7. Review the changes, and press the OK button.
  8. The NuGet client will now update your project as needed. Among other things, it will download and copy over the QuickOPC assemblies, and reference them.
  9. A “readme.txt” file appears in the editor, with additional information. It is recommended that you read the file.
  10. You can now start using the types from the referenced QuickOPC assemblies.

If you do not see the packages in the NuGet Package Manager, make sure your project's framework is set to .NET Framework 4.7.2 or later, or .NET 6 or 7.

Using Package Manager Console

This text assumes that you are using Visual Studio 2022. With other tools, the procedures may be different, but should be reasonably similar.

In order to install a QuickOPC NuGet package and reference it from your project using Package Manager Console:

  1. In the Visual Studio, select Tools -> NuGet Package Manager -> Package Manager Console.
  2. Make sure that Package source is set to “nuget.org”.
  3. In the Default project drop-down, select the project.
  4. Enter command Install-Package Id, where Id is the package ID of the package to install (for example, OpcLabs.QuickOpc). Press Enter.
  5. The NuGet client will now update your project as needed. Among other things, it will download and copy over the QuickOPC assemblies, and reference them.
  6. A “readme.txt” file appears in the editor, with additional information. It is recommended that you read the file.
  7. You can now start using the types from the referenced QuickOPC assemblies.

Switch to PackageReference

It is recommended that you switch your project to the PackageReference model (see PackageReference in project files). To do, right-click on the References node in the Solution Explorer window, and select Migrate packages.config to PackageReference command.

More information: Migrate from packages.config to PackageReference  

See Also